package com.hutianao.gqgl.information.internationalOffer.control;

import com.hutianao.gqgl.information.internationalOffer.entity.SearchInternationalOfferEntity;
import com.hutianao.gqgl.information.internationalOffer.service.InternationalOfferService;
import com.hutianao.gqgl.mybatis.entity.InternationalOfferEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PadingRstType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller

@RequestMapping("/information/internationalOffer")
public class InternationalOfferController {
    private Logger logger = LogManager.getLogger(this.getClass());
    @Resource
    private InternationalOfferService internationalOfferService;
    @RequestMapping("/informationPage")
    public String informationPage(){
        return "information/internationalOffer/informationPage";
    }
    @RequestMapping("/queryInternationalOfferInfoListByPage")
    @ResponseBody
    public PadingRstType<InternationalOfferEntity> queryInternationalOfferInfoListByPage(SearchInternationalOfferEntity search, PaddingEntity padding){
        logger.info(search);
        logger.info(padding);
        PadingRstType<InternationalOfferEntity> padingRstType = internationalOfferService.queryInternationalOfferInfoListByPage(search,padding);
        return padingRstType;
    }
}
